<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">      //导入jquery
	</script>
  <script type="text/javascript">
  	
  
	$(document).ready(function(){                                 //预加载
			$("#btn").click(function(){                                 //绑定button事件
				
//			   	var focusBean = {                                 //写成这种
//					'focusBean.uid':'123',
//					'focusBean.uided':'141'
//	 
				var params = {
					'uid':'123'
				}
			   	$.ajax({										//发送ajax请求
					url:"http://localhost:8080/YimooBP1.0/myshowhistory",           
					type:"POST",
					data:params,
					datatype:"json",
					success:function(data){
						console.log(data);
						alert(data);
					},
					error:function(){
						alert("error");
					}
					});
					
 			 });
 			
	});
  </script>
  <body>
  	<form>
  		用户名：<input type="text" name="userAccount" id="userAccount"><br>
  		密码：<input type="password" name="userPassword"><br>
  		文件：<input type="file" id="file"/>
  	</form>
  	<button id="btn">点我一下</button>
  </body>
</html>
